<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<html>

<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-language" content="en" />
<meta name="Keywords" content="progress,ant,compilation,automated,task,querret,apache,build tools,roundtable" />
<meta name="Description" content="PCT is set of ANT tasks designed to compile Progress procedures among others things" />
<meta name="revisit-after" content="30 days" />
<meta name="DC.Language" content="en" />
<title>PCT documentation - PLReader</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" title="Normal" />
</head>
<body>

<div class="Main">

<div class="Bandeau">
  <span id="sflogo">
    <a href="http://sourceforge.net"><img id="sflogoimg" alt="SourceForge.net Logo" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=%3Cb%3E85743%3C/b%3E&amp;amp;type=1"/></a>
  </span>
  Progress&reg; OpenEdge&reg; Compilation Tools
</div>

<div class="Menu">
  <a href="index.html">Overview</a>
  :: <a href="download.html">Download</a>
  :: <a href="screenshots.html">Screenshots</a>
  :: <span class="selected">Documentation</span>
  :: <a href="javadoc/index.html">JavaDoc</a>
  :: <a href="links.html">Links</a>
</div>

@RIGHT_BANNER@

<div class="Text">
<h1>Overview</h1>
<p>
The PLReader class was developed during my attempt to setup JUnit tests for PCT. I needed a way to check
files were correctly added in archives with the PCTLibrary task.
</p>
<p>
Using an hex editor and the PROLIB utility, I tried to guess the structure of a PL file. A library
is divided into 3 parts&nbsp;:</p>
<ul>
<li>Header : describes codepage, and a pointer to the files list</li>
<li>Files content</li>
<li>Files list : </li>
</ul>
<table cellpadding="2">
<tr>
<th colspan="3">Header</th>
</tr>
<tr>
<th>Offset</th>
<th>Size (in bytes)</th>
<th>Description</th>
</tr>
<tr>
<td align="center">0x00</td>
<td align="center">2</td>
<td>Magic number : always 0xD707</td>
</tr>
<tr>
<td align="center">0x02</td>
<td align="center">20</td>
<td>Codepage used to store file names</td>
</tr>
<tr>
<td align="center">0x16</td>
<td align="center">8</td>
<td>Unknown</td>
</tr>
<tr>
<td align="center">0x1E</td>
<td align="center">4</td>
<td>Files list's offset</td>
</tr>
</table>

<p>Each file in the files list is a sequence of bytes, which are described here&nbsp;:</p>
<table>
<tr>
<th colspan="3">Files list entry</th>
</tr>
<tr>
<th>Offset</th>
<th>Size (in bytes)</th>
<th>Description</th>
</tr>
<tr>
<td align="center">0x00</td>
<td align="center">1</td>
<td>Magic number : if 0xFF, it's a file entry, if 0xFE jump to the next 0xFF</td>
</tr>
<tr>
<td align="center">0x01</td>
<td align="center">1</td>
<td>Size of the file name (noted SZ)</td>
</tr>
<tr>
<td align="center">0x02</td>
<td align="center">SZ</td>
<td>File name</td>
</tr>
<tr>
<td align="center">0x02 + SZ</td>
<td align="center">2</td>
<td>Unknown</td>
</tr>
<tr>
<td align="center">0x04 + SZ</td>
<td align="center">4</td>
<td>Offset of the beginning of the file content</td>
</tr>
<tr>
<td align="center">0x08 + SZ</td>
<td align="center">1</td>
<td>Unknown. Sometimes FF, sometimes 0A...</td>
</tr>
<tr>
<td align="center">0x09 + SZ</td>
<td align="center">4</td>
<td>File size (in bytes)</td>
</tr>
<tr>
<td align="center">0x13 + SZ</td>
<td align="center">4</td>
<td>Added to archive (in seconds since 1/1/1970)</td>
</tr>
<tr>
<td align="center">0x17 + SZ</td>
<td align="center">4</td>
<td>Modification timestamp (in seconds since 1/1/1970)</td>
</tr>
<tr>
<td align="center">0x21 + SZ</td>
<td align="center">8</td>
<td>Always 0x00000000</td>
</tr>
</table>

</div>

</div>
@ANALYTICS@</body>

</html>
